package com.yunhai.xc.test;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/a")
public class upload {
	// 测试图片上传 bootstrap fileInput
	// https://github.com/kartik-v/bootstrap-fileinput
	@RequestMapping("/fileInput")
	public String test() {
		return "imageUpload";
	}

	// 测试富文本bootstrap summernote http://summernote.org/
	@RequestMapping("/summer")
	public String summer() {
		return "summernote";
	}

	@RequestMapping("/jquery1")
	public String jquery1() {
		return "from";
	}

	@RequestMapping("/jquery")
	@ResponseBody
	public ModelMap jquery() {
		ModelMap mp = new ModelMap();
		mp.put("status", 1);
		mp.put("state", "success");
		mp.put("msg", "操作成功");
		mp.put("referer", "/a/summer");
		mp.put("result", null);
		return mp;
	}

}
